<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="../css/aui.css" />
		<link rel="stylesheet" type="text/css" href="../css/auislide.css" />
		<link rel="stylesheet" type="text/css" href="../css/style1.css" />
		<link rel="stylesheet" type="text/css" href="../css/style_user.css" />
		<style type="text/css">
			html,
			body {
				background-color: #fff;
				background-size: 100% 100%;
			}
			
			.text-white {
				color: #f4f4f4 !important;
			}
			
			.aui-grid [class*=aui-col-] {
				padding: 0.75rem 0;
			}
			
			.iconfont {
				font-size: 1.5rem
			}
			
			#user_bg {
				position: fixed;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				min-width: 1000px;
				z-index: -10;
				zoom: 1;
				background-color: #fff;
				background-repeat: no-repeat;
				background-size: cover;
				-webkit-background-size: cover;
				-o-background-size: cover;
				background-position: center 0;
			}
		</style>
	</head>

	<body>

		<!--上面新框架-->

		<!-- 顶部 -->
  <div id="aui-slide">
    <div id="slidebox" class="aui-slide-wrap" style="margin: 5px;border-radius:0.5rem;box-shadow:0.1rem 0.1rem 0.4rem rgba(99, 99, 99, 0.3);">


                <!--顶部横幅未加载完成时的提示-->
                  <img id="bpic" src="../image/cz_banner.png"  onClick="UnloadedCompleted()">
                <!--顶部横幅未加载完成时的提示-->


    </div>
    <div class="aui-slide-page-wrap"><!--分页容器--></div>
  </div>




              <div class="gonggao"style=" border-radius: 0px 0px 30px 30px; box-shadow: 0.01rem 0.15rem 0.1rem rgba(0, 0, 0, 0.05);">
    <div class="list-title-l">
      <i class="iconfont icon-xitonggonggao" style="background: linear-gradient(to right, #00ffe7, #d800ff); -webkit-background-clip: text; color: transparent;font-size: 1rem"></i>
    </div>
    <div class="gonggao-r" style="float:right;width: 89%;">
        <marquee scrollamount="2">
         <span id="gonggao" style="background: linear-gradient(to right, #00e7ff, #d800ff); -webkit-background-clip: text; color: transparent;font-size: 0.65rem;padding-top:0.3rem;"></span>
       </marquee>
                </div>
                    
              </div>
  </div>
	</div>
  <section class="aui-grid aui-margin-b-15">
      <div class="aui-row" id="div_list_f">

      </div>
  </section>
</body>
<div class="list-title">
        <div class="list-title-l">
            <span style="color:#444;font-size: 0.6rem"><i class="iconfont icon-zuirehotchunse" style="color:#ff7600;font-size: 0.8rem"></i>代理专区</span>
        </div>
        <div class="list-title-r" id="wzbox_top">

        </div>
    </div>
<br>
				<div class="aui-card-white">
					<!--    <div class="aui-palace clearfix"> 4格 -->

					<div class="aui-palace aui-palace-clear clearfix">
						
						<a onClick="DailiShezhi()" class="aui-palace-grid">
							<div class="aui-palace-grid-icon">
								<img src="../image/app/tuichu.png" alt="">
							</div>
							<div class="aui-palace-grid-text">
								<h2>运营设置</h2>
							</div>
						</a>						

						<!--    <a href="javascript:;" class="aui-palace-grid">
                                    <div class="aui-palace-grid-icon">909
                                    </div>
                                    <div class="aui-palace-grid-text">
                                        <h2>直播币</h2>
                                    </div>
                                </a> -->
						<a onClick="GuangGap()" class="aui-palace-grid">
							<div class="aui-palace-grid-icon">
								<img src="../image/app/6566.png" alt="">
							</div>
							<div class="aui-palace-grid-text">
								<h2>广告设置</h2>
							</div>
						</a>
						<a onclick="totxjl()" class="aui-palace-grid">
							<div class="aui-palace-grid-icon">
								<img src="../image/app/252.png" alt="">
							</div>
							<div class="aui-palace-grid-text">
								<h2>提现记录</h2>
							</div>
						</a>
						<a onClick="DailiQuma()" class="aui-palace-grid">
							<!--    <a onClick="openWin('daili_login_win')"  class="aui-palace-grid"> 版本2 -->
							<!--    <a onClick="openWin('daili')" class="aui-palace-grid"> 版本1-->
							<div class="aui-palace-grid-icon">
								<img src="../image/app/666.png" alt="">
							</div>
							<div class="aui-palace-grid-text">
								<h2>自助取卡</h2>
							</div>
						</a>						
					</div>
				</div>
				<div class="aui-card-white">
					<div class="aui-palace aui-palace-clear clearfix">
						<a onClick="DailiGuanLi()" class="aui-palace-grid">
							<div class="aui-palace-grid-icon">
								<img src="../image/app/111.png" alt="">
							</div>
							<div class="aui-palace-grid-text">
								<h2>代理用户</h2>
							</div>
						</a>
						
						<a onClick="wodedaili()" class="aui-palace-grid">
							<div class="aui-palace-grid-icon">
								<img src="../image/app/ddld.png" alt="">
							</div>
							<div class="aui-palace-grid-text">
								<h2>我的代理</h2>
							</div>
						</a>

						<a onclick="dailisy()" class="aui-palace-grid aui-palace-grid-line">
							<div class="aui-palace-grid-icon">
								<img src="../image/app/785.png" alt="">
							</div>
				<!--			<div class="aui-palace-grid-text" id="ktdl" onclick="kaidl()">
								<h2>加盟代理</h2>
						</div> -->
							<div class="aui-palace-grid-text" id="dlsy" >
								<h2>代理收益</h2>
							</div>
						</a>
						<a onClick="dlcz()" class="aui-palace-grid">
							<div class="aui-palace-grid-icon">
								<img src="../image/app/zhuanqujifen.png" alt="">
							</div>
							<div class="aui-palace-grid-text">
								<h2>代理充值</h2>
							</div>
						</a>						
						
					</div>
				</div>
				
<div class="list-title">
        <div class="list-title-l">
            <span style="color:#444;font-size: 0.6rem"><i class="iconfont icon-zuirehotchunse" style="color:#ff7600;font-size: 0.8rem"></i>管理员专区</span>
        </div>
        <div class="list-title-r" id="wzbox_top">

        </div>
    </div>
<br>
				<div class="aui-card-white">
					<div class="aui-palace aui-palace-clear clearfix">
						<a onClick="tjyh()" class="aui-palace-grid">
							<div class="aui-palace-grid-icon">
								<img src="../image/app/111.png" alt="">
							</div>
							<div class="aui-palace-grid-text">
								<h2>添加用户</h2>
							</div>
						</a>
						<a onClick="kmjl()" class="aui-palace-grid">
							<div class="aui-palace-grid-icon">
								<img src="../image/app/666.png" alt="">
							</div>
							<div class="aui-palace-grid-text">
								<h2>卡密记录</h2>
							</div>
						</a>
						<a onClick="zqjs()" class="aui-palace-grid">
							<div class="aui-palace-grid-icon">
								<img src="../image/app/zzgz.png" alt="">
							</div>
							<div class="aui-palace-grid-text">
								<h2>代理介绍</h2>
							</div>
						</a>
						<a onClick="lyzx()" class="aui-palace-grid">
							<div class="aui-palace-grid-icon">
								<img src="../image/app/lianxikefu.png" alt="">
							</div>
							<div class="aui-palace-grid-text">
								<h2>留言中心</h2>
							</div>
						</a>							
						

			</div>

			</div>

		</section>

	</body>
<script type="text/x-dot-template" id="bannertpl">
  {{~ it.data : value : index }}
    <div class="aui-slide-node bg-dark" tapmode onclick="toBanner('{{= value. linkurl }}')">
        <img src="http://ys.6love.site/{{= value. picurl }}" />
    </div>
  {{~}}
</script>	
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/doT.js"></script>
<script type="text/javascript" src="../script/auipullrefresh.js"></script>
<script type="text/javascript" src="../script/auislide.js"></script>
<script type="text/javascript" src="../script/auilazyload.js" ></script>
	<script type="text/javascript">
  var imgdz = '';
  var api_url = localStorage.getItem('api_url');
/////  初始化执行   S /////
/////  apiready  一打开就执行的 函数

  apiready = function(){

      //下拉刷新
          api.setCustomRefreshHeaderInfo({
              bgColor : '#fff',
               images: [
                    'widget://image/app/xiala/1.png',
                    'widget://image/app/xiala/2.png',
                    'widget://image/app/xiala/3.png',
                    'widget://image/app/xiala/4.png',
                    'widget://image/app/xiala/5.png',
                    'widget://image/app/xiala/6.png',
                    'widget://image/app/xiala/7.png',
                    'widget://image/app/xiala/8.png',
                      ],
                      tips: {
                          pull: '下拉刷新！',
                          threshold: '松开立即刷新！',
                          load: '正在刷新'
                      }

			}, function() {
				getBanner();
				//下拉刷新被触发，自动进入加载状态，使用 api.refreshHeaderLoadDone() 手动结束加载中状态
				setTimeout(function() {
					api.refreshHeaderLoadDone()
				}, 3000);
			});
          //下拉刷新





			getBanner();
    api.parseTapmode();

    //////////////////////    图片懒加载  S  //////////////////////
      new auiLazyload({
          errorImage:'../image/error-img.jpg'
      });

    //////////////////////    图片懒加载  E  //////////////////////



  }

/////  初始化执行   E /////
///// *****某个请求提示框   具体用处不明   *******/////
  function playRadio(){
    api.hideProgress();
  }
  ///// *****某个请求提示框   具体用处不明   *******/////
  
  //////////////////////   打开APP时 获取Banner和图标  方法    DataLoading    定时     S //////////////////////

  //定时执行数据加载
  var timer = setInterval(function(){
      DataLoading();
  },1000)

  //判断是否服务器通信成功
  function DataLoading() {

    api.ajax({
        url: api_url+'/login/login/banben.html',
        method: 'get'
    },function(ret, err){
        if (ret) {

          getBanner();   //获取Banner
          // getNav();    //获取Nav
          //alert( JSON.stringify( ret ) );
/*  关闭提示
          api.toast({
              msg: '数据已更新',
              duration: 1000
          });
*/

clearInterval(timer); // 获取成功 清除定时器
        } /*else {
          api.toast({
              msg: '数据获取成功 当前为最新数据',
              duration: 1000
          });

            //alert( JSON.stringify( err ) );
        }
        */
    });




  }

  //////////////////////   打开APP时 获取Banner和图标  方法    DataLoading    定时     E //////////////////////



///////访问轮播地址 方法    toBanner   S   ///////
function toBanner(url){

  if (url == '') {


    api.toast({
        msg: '(#^.^#) 暂无详情'
    });

  }else {


    //网络连接判断S


                        api.ajax({
                            url: api_url+'/login/login/banben.html',
                            method: 'get'
                        },function(ret, err){
                            if (ret) {

                                         //网络正常   跳转





                                               /*
                                               api.showProgress({
                                                   title: 'VIP登录中',
                                                   modal: false
                                               });
                                         */
                                         api.toast({
                                             msg: '加载中'
                                         });



                                               api.openWin({
                                                   name: 'h5',
                                                   url: './h5.html',
                                                   pageParam: {
                                                       url: url
                                                   }
                                               });




                            } else {

                                        //网络连接失败 进行提示
                                        NetworkConnectionFailurePrompt();

          }


      });
//网络连接判断E

  }
}

///////访问轮播地址 方法    toBanner   E   ///////  





		

		/////////////获取会员数据 方法  getData  S   ////////////

		function getData() {
			var user_id = localStorage.getItem('user_id');
			var user_name = localStorage.getItem('user_name');
			var user_time = localStorage.getItem('user_time');

			var status = $api.byId('status'); //账号状态  用于判断封号
			var s1 = formatDateTime(user_time);
			var timestamp = Date.parse(new Date()) / 1000;
			var time = $api.byId('time');
			var islogin = $api.byId('islogin');
			var ispower = $api.byId('ispower');
  			var userImg = $api.byId('user_img');
			//alert(user_time);
			if(user_time > timestamp) {
				time_ico.innerHTML = ' 超级 VIP';
				time.innerHTML = ' 将于 ' + s1 + ' 到期';
				islogin_vip.innerHTML = ' <img src="../image/app/vip_huangjin.png" alt=""  style=" width: 15px; height: 15px; ">';
			}
			if(user_time < timestamp) {
				time_ico.innerHTML = ' 已过期';
				time.innerHTML = 'VIP已到期 请及时续费';
				islogin_vip.innerHTML = ' <img src="../image/app/vip_guoqi.png" alt=""  style=" width: 15px; height: 15px; ">';
			}
			if(user_time == "-1") {
				time_ico.innerHTML = ' 超级 VIP ';
				time.innerHTML = ' 永久贵宾';
				islogin_vip.innerHTML = ' <img src="../image/app/vip_yongjiu.png" alt="" style=" width: 15px; height: 15px; ">';
			}

			if(user_id == "1") {
				time_ico.innerHTML = ' 管理员 ';
				time.innerHTML = ' 欢迎回来！';

				weichat.innerHTML = '微信号：15163222859';
				islogin_vip.innerHTML = ' <img src="../image/app/vip_guanfang.png" alt="" style=" width: 45px; height: 15px; ">';

				islogin.innerHTML = '' + user_name;
				isloginOrOut.innerHTML = ' <div class="aui-panel-time"  onclick="exitLogin()">安全退出</div>';
				userlogo.innerHTML = ' <img id="user_img" src="../image/app/admin.png" alt="" style="box-shadow: 0 2px 6px 0 rgba(0,0,0,0.3);" alt="">';
			}

			if(localStorage.getItem('user_id') < 1) {
				time_ico.innerHTML = ' - - - ';
				time.innerHTML = ' ';
				islogin_vip.innerHTML = ' ';
				isloginOrOut.innerHTML = ' <div class="aui-panel-time"  onClick="toLogin()">立刻登录</div>';
				userlogo.innerHTML = ' <img id="user_img" src="../image/app/defaultuser.png" alt="" style="box-shadow: 0 2px 6px 0 rgba(0,0,0,0.3);" alt="">';
			}
			if(localStorage.getItem('user_id') > 1) {
				
				islogin.innerHTML = '' + user_name;
				isloginOrOut.innerHTML = ' <div class="aui-panel-time"  onclick="exitLogin()">安全退出</div>';
				userlogo.innerHTML = ' <img id="user_img" src="../image/app/user.png" alt="" style="box-shadow: 0 2px 6px 0 rgba(0,0,0,0.3);" alt="">';
				
				if (localStorage.getItem('accountLogin')==1) {
		            islogin.innerHTML = localStorage.getItem('Other_name');
		            var userImg = $api.byId('user_img');
		            userImg.src = localStorage.getItem('Other_img');
		       }



				//获取金币

				//如果已经登录就执行下面 获取金币
				api.parseTapmode();
			

				api.ajax({
					url: api_url + '/login/login/share.html',
					method: 'get',
					data: {
						values: {
							uid: localStorage.getItem('user_id')
						}
					}
				}, function(ret, err) {
					if(ret) {
						var bili = $api.byId('bili');
						jifenbi = ret.sign;
						//      bili.innerHTML = ret.sign+'金币可以兑换1天会员资格哦！';
						api.hideProgress();

					} else {
						api.toast({
							msg: '信息获取成功 当显示为最新数据！',
							duration: 5000
						});
					}
				}); //金币获取结束

			}
			
	        ////获取 权力
			api.ajax({
				url: api_url + '/login/login/sign.html',
				method: 'get',
				data: {
					values: {
						uid: localStorage.getItem('user_id')
					}
				}
			}, function(ret, err) {
				if(ret) {
					var ispower = $api.byId('ispower');
					
							
					if(ret.msg['power'] == "0") {
						ispower.innerHTML = '     <img src="../image/app/vip_guanfang.png" alt="" style=" width: 45px; height: 15px;  margin-left: 5px;"> ';
					
					}

					if(ret.msg['power'] == "1") {
						ispower.innerHTML = '     <img src="../image/app/vip_hehuoren.png" alt="" style=" width: 45px; height: 15px;  margin-left: 5px;"> ';
				
					}

				}

			});
		}
		/////////////获取会员数据 方法  getData  E   ////////////

		/////////////未登录检测 提醒 方法  doItPerSecond  S  （定时检测）  ////////////
		//未登录提示
		var timer = setInterval(function() {
			doItPerSecond();
		}, 20000)

		function doItPerSecond() {

			if(localStorage.getItem('user_id') < 1) {

				api.toast({
					msg: '还没登陆 部分功能受限',
					duration: 3000
				});

			}

		}
		/////////////未登录检测 提醒 方法  doItPerSecond  E  （定时检测）  ////////////



		
		    function kaidl(){

		        if (localStorage.getItem('user_id') > 1) {
		          api.openWin({
		              name: 'open_agent_win',
		              url: './open_agent_win.html',
		              delay: 300,
		          });
		        }else {     //否则跳转到登录
		          api.openWin({
		              name: 'login',
		              url: './login.html',
		              delay: 300,
		          });
		        }
		    }
   function dailisy(){

		        if (localStorage.getItem('user_id') < 1) {
		           api.openWin({
		              name: 'login',
		              url: './login.html',
		              delay: 300,
		          });
		        }else {     //否则跳转到登录
				api.openWin({
				    name: 'dailishow_win',
				    url: './dailishow_win.html',
				    delay: 300,
				});
		        }
		    }
				
		function wodehuiy(){
		
				        if (localStorage.getItem('user_id') > 1) {
				          api.openWin({
				              name: 'wodehy_win',
				              url: './wodehy_win.html',
				              delay: 300,
				          });
				        }else {     //否则跳转到登录
				          api.openWin({
				              name: 'login',
				              url: './login.html',
				              delay: 300,
				          });
				        }
				    }



		////////////打开页面 方法  openWin   S   ////////////

		function openWin(name) {

			//如果判断没有登录 就提示  并跳转到登录页面
			if(localStorage.getItem('user_id') < 1) {

				api.toast({
					msg: '亲爱的，你还没用登录哦！',
					duration: 2000
				});

				api.openWin({
					name: 'login',
					url: './login.html',
					delay: 300
				});
				return;
			}
			//↑↑↑↑↑↑↑上面LEEi   新加

			//网络连接判断S

			api.ajax({
				url: api_url + '/login/login/banben.html',
				method: 'get'
			}, function(ret, err) {
				if(ret) {

					var delay = 0;
					if(api.systemType != 'ios') {
						delay = 300;
					}
					api.openWin({
						name: '' + name + '',
						url: '' + name + '.html',
						bounces: false,
						delay: delay,
						slidBackEnabled: true,
						vScrollBarEnabled: false
					});

				} else {

					//网络连接失败 进行提示
					NetworkConnectionFailurePrompt();

				}

			});
			//网络连接判断E

		}
		////////////打开页面 方法  openWin   e   ////////////



		/////////////观看帮助 方法  videoHelp   S   ////////////
		function dlcz() {
            var user_id = localStorage.getItem('user_id');
			var user_name = localStorage.getItem('user_name');
			var user_password = localStorage.getItem('password');
			var user_power = localStorage.getItem('power'); //权力  用于判断管理员
			//alert(user_time);

			if(localStorage.getItem('user_id') < 1) {
				//如果没登陆

				api.toast({
					msg: '亲爱的，你还没用登录哦！',
					duration: 2000
				});

				api.openWin({
					name: 'login',
					url: './login.html',
					delay: 300
				});
				return;

			}else if(localStorage.getItem('user_id') > 1){
			//普通用户登录检测
			if(localStorage.getItem('user_name') != null&&localStorage.getItem('user_name') != undefined&&localStorage.getItem('user_name') != '') {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) { 
						if(ret.code == 0) {
							NoAgencyAuthority()
							return;
						} else if(ret.code == 1) {
							api.toast({
								msg: '验证成功 正在登录',
								duration: 5000
							});
							var delay = 0;
							if(api.systemType != 'ios') {
								delay = 300;
							}
							api.openWin({
								name: 'dailichongzhi_win',
								url: './dailichongzhi_win.html',
								delay: 300,
								
								bgColor: 'rgba(0,0,0,0)'
							});

						}
					} else {
						api.hideProgress();
						/*   alert('网络错误！');
						      原弹窗提示*/
						api.toast({
							msg: '(ｷ｀ﾟДﾟ´)!!  网络错误 请检查！',
							duration: 5000
						});

						//alert( JSON.stringify( err ) );
						return;
					}
				});

			}}

			//管理员用户管理
			if(localStorage.getItem('user_id') == 1) {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '管理员登录',
								duration: 5000
							});
			                    var delay = 0;
			                    if(api.systemType != 'ios') {
			                  	   delay = 300;
			                    }
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/user/index'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						} else {
							api.hideProgress();
							return;
						}
					}

				});

			}
		}
		/////////////观看帮助 方法  videoHelp   E   ////////////

		/////////////留言反馈 方法  liuyan   S   ////////////
		function liuyan() {

			api.toast({
				msg: '开发中'
			});
		}
		/////////////留言反馈 方法  liuyan   E   ////////////

		/////////////代理帮助 方法  dailiHelp   S   ////////////
		function dailiHelp() {

			api.toast({
				msg: '开发中'
			});
		}
		/////////////代理帮助 方法  dailiHelp   E   ////////////

		/////////////代理介绍 方法  dailiJieshao   S   ////////////
		function dailiJieshao() {

			api.toast({
				msg: '开发中'
			});
		}
		/////////////代理介绍 方法  dailiJieshao   E   ////////////







		//获取数据
		function GuangGap() {
			var user_id = localStorage.getItem('user_id');
			var user_name = localStorage.getItem('user_name');
			var user_password = localStorage.getItem('password');
			var user_power = localStorage.getItem('power'); //权力  用于判断管理员
			//alert(user_time);

			if(localStorage.getItem('user_id') < 1) {
				//如果没登陆

				api.toast({
					msg: '(ｷ｀ﾟДﾟ´)!!    你还没登陆！',
					duration: 2000
				});

				api.openWin({
					name: 'login',
					url: './login.html',
					delay: 300
				});
				return;

			}
			//普通用户登录检测
			if(localStorage.getItem('user_name') != null&&localStorage.getItem('user_name') != undefined&&localStorage.getItem('user_name') != '') {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 0) {
							/*    api.hideProgress();
             alert('账号或密码不正确');
原弹窗提示*/
             api.toast({
                 msg: '密码不正确或无权限！',
                 duration: 5000
             });

             
							NoAgencyAuthority()

							return;
						} else if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '验证成功 正在登录',
								duration: 5000
							});

							//alert( JSON.stringify( ret ) );
							/*
               api.sendEvent({
                 name: 'newLoingdata',
                 extra: {
                 }
               });



               api.hideProgress();

         api.closeWin({
               });

            api.openWin({
                 name: 'h5',
                 url: 'http://ys.6love.site/index/index/index',
                });
*/
                            var delay = 0;
							if(api.systemType != 'ios') {
								delay = 300;
							}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/banner/index/id/1.html'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						}
					} else {
						api.hideProgress();
						/*   alert('网络错误！');
						      原弹窗提示*/
						api.toast({
							msg: '(ｷ｀ﾟДﾟ´)!!  网络错误 请检查！',
							duration: 5000
						});

						//alert( JSON.stringify( err ) );
						return;
					}
				});

			}

			//管理员取码
			if(localStorage.getItem('user_id') == 1) {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '管理员登录',
								duration: 5000
							});
                            			var delay = 0;
			if(api.systemType != 'ios') {
				delay = 300;
			}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/banner/index/id/1.html'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						} else {
							api.hideProgress();
							return;
						}
					}

				});

			}

		}




		//获取数据
		function tjyh() {
			var user_id = localStorage.getItem('user_id');
			var user_name = localStorage.getItem('user_name');
			var user_password = localStorage.getItem('password');
			var user_power = localStorage.getItem('power'); //权力  用于判断管理员
			//alert(user_time);

			if(localStorage.getItem('user_id') < 1) {
				//如果没登陆

				api.toast({
					msg: '(ｷ｀ﾟДﾟ´)!!    你还没登陆！',
					duration: 2000
				});

				api.openWin({
					name: 'login',
					url: './login.html',
					delay: 300
				});
				return;

			}
			//普通用户登录检测
			if(localStorage.getItem('user_name') != null&&localStorage.getItem('user_name') != undefined&&localStorage.getItem('user_name') != '') {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 0) {
							/*    api.hideProgress();
             alert('账号或密码不正确');
原弹窗提示*/
             api.toast({
                 msg: '密码不正确或无权限！',
                 duration: 5000
             });

             
							NoAgencyAuthority()

							return;
						} else if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '验证成功 正在登录',
								duration: 5000
							});

							//alert( JSON.stringify( ret ) );
							/*
               api.sendEvent({
                 name: 'newLoingdata',
                 extra: {
                 }
               });



               api.hideProgress();

         api.closeWin({
               });

            api.openWin({
                 name: 'h5',
                 url: 'http://ys.6love.site/index/index/index',
                });
*/
                            var delay = 0;
							if(api.systemType != 'ios') {
								delay = 300;
							}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/user/add.html'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						}
					} else {
						api.hideProgress();
						/*   alert('网络错误！');
						      原弹窗提示*/
						api.toast({
							msg: '(ｷ｀ﾟДﾟ´)!!  网络错误 请检查！',
							duration: 5000
						});

						//alert( JSON.stringify( err ) );
						return;
					}
				});

			}

			//管理员取码
			if(localStorage.getItem('user_id') == 1) {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '管理员登录',
								duration: 5000
							});
                            			var delay = 0;
			if(api.systemType != 'ios') {
				delay = 300;
			}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/user/add.html'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						} else {
							api.hideProgress();
							return;
						}
					}

				});

			}

		}



		//获取数据
		function kmjl() {
			var user_id = localStorage.getItem('user_id');
			var user_name = localStorage.getItem('user_name');
			var user_password = localStorage.getItem('password');
			var user_power = localStorage.getItem('power'); //权力  用于判断管理员
			//alert(user_time);

			if(localStorage.getItem('user_id') < 1) {
				//如果没登陆

				api.toast({
					msg: '(ｷ｀ﾟДﾟ´)!!    你还没登陆！',
					duration: 2000
				});

				api.openWin({
					name: 'login',
					url: './login.html',
					delay: 300
				});
				return;

			}
			//普通用户登录检测
			if(localStorage.getItem('user_name') != null&&localStorage.getItem('user_name') != undefined&&localStorage.getItem('user_name') != '') {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 0) {
							/*    api.hideProgress();
             alert('账号或密码不正确');
原弹窗提示*/
             api.toast({
                 msg: '密码不正确或无权限！',
                 duration: 5000
             });

             
							NoAgencyAuthority()

							return;
						} else if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '验证成功 正在登录',
								duration: 5000
							});

							//alert( JSON.stringify( ret ) );
							/*
               api.sendEvent({
                 name: 'newLoingdata',
                 extra: {
                 }
               });



               api.hideProgress();

         api.closeWin({
               });

            api.openWin({
                 name: 'h5',
                 url: 'http://ys.6love.site/index/index/index',
                });
*/
                            var delay = 0;
							if(api.systemType != 'ios') {
								delay = 300;
							}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/dianka/slog.html'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						}
					} else {
						api.hideProgress();
						/*   alert('网络错误！');
						      原弹窗提示*/
						api.toast({
							msg: '(ｷ｀ﾟДﾟ´)!!  网络错误 请检查！',
							duration: 5000
						});

						//alert( JSON.stringify( err ) );
						return;
					}
				});

			}

			//管理员取码
			if(localStorage.getItem('user_id') == 1) {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '管理员登录',
								duration: 5000
							});
                            			var delay = 0;
			if(api.systemType != 'ios') {
				delay = 300;
			}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/dianka/slog.html'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						} else {
							api.hideProgress();
							return;
						}
					}

				});

			}

		}

		///////代理广告方法  E  //////
///////添加合伙人方法////////////
function tjdl(){
	 api.openWin({
                  name: 'daili_guanli_win',
                  url: './daili_guanli_win.html',
                  delay: 100,
                  pageParam:{url:api_url+'index/dianka/slog.html'},
                  bgColor: 'rgba(0,0,0,0)'
              });
}
///////添加合伙人方法////////////

///////添加合伙人方法////////////
function lyzx(){
	 api.openWin({
                  name: 'daili_guanli_win',
                  url: './daili_guanli_win.html',
                  delay: 100,
                  pageParam:{url:'http://www.010ttw.cn/book.html'},
                  bgColor: 'rgba(0,0,0,0)'
              });
}
///////添加合伙人方法////////////

///////添加合伙人方法////////////
function zqjs(){
	 api.openWin({
                  name: 'daili_guanli_win',
                  url: './daili_guanli_win.html',
                  delay: 100,
                  pageParam:{url:api_url+'dljs/daili.jpg'},
                  bgColor: 'rgba(0,0,0,0)'
              });
}
///////添加合伙人方法////////////



		///////代理登录方法  s  //////

		//获取数据
		function DailiLogin() {
			/*  var user_id = localStorage.getItem('user_id');
			  var user_name = localStorage.getItem('user_name');
			  var user_password = localStorage.getItem('password');
			  var user_power = localStorage.getItem('power');   //权力  用于判断管理员
			  //alert(user_time);
			*/

			if(localStorage.getItem('user_id') < 1) {
				//如果没登陆

				api.toast({
					msg: '亲爱的，你还没用登录哦！',
					duration: 2000
				});

				api.openWin({
					name: 'login',
					url: './login.html',
					delay: 300
				});
				return;

			}

			//普通用户检测
			if(localStorage.getItem('user_name') != null&&localStorage.getItem('user_name') != undefined&&localStorage.getItem('user_name') != ''&&localStorage.getItem('user_name') != '') {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 0) {
							/*    api.hideProgress();
             alert('账号或密码不正确');
原弹窗提示*/
             api.toast({
                 msg: '密码不正确或无权限！',
                 duration: 5000
             });

             
							NoAgencyAuthority()

							return;
						} else if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '验证成功 正在登录',
								duration: 5000
							});

							//alert( JSON.stringify( ret ) );
							/*
               api.sendEvent({
                 name: 'newLoingdata',
                 extra: {
                 }
               });



               api.hideProgress();

         api.closeWin({
               });

            api.openWin({
                 name: 'h5',
                 url: 'http://ys.6love.site/index/index/index',
                });
*/                           	  var delay = 0;
			                      if(api.systemType != 'ios') {
				                  delay = 300;
			                        }
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/index/index'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						}
					} else {
						api.hideProgress();
						/*   alert('网络错误！');
						      原弹窗提示*/
						api.toast({
							msg: '(ｷ｀ﾟДﾟ´)!!  网络错误 请检查！',
							duration: 5000
						});

						//alert( JSON.stringify( err ) );
						return;
					}
				});

			}

			//管理员登录
			if(localStorage.getItem('user_id') == 1) {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '管理员登录',
								duration: 5000
							});
			var delay = 0;
			if(api.systemType != 'ios') {
				delay = 300;
			}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/index/index'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						} else {
							api.hideProgress();
							return;
						}
					}

				});

			}

		}

		///////代理登录方法  E  //////

		///////代理取码方法  s  //////

		//获取数据
		function DailiQuma() {
			var user_id = localStorage.getItem('user_id');
			var user_name = localStorage.getItem('user_name');
			var user_password = localStorage.getItem('password');
			var user_power = localStorage.getItem('power'); //权力  用于判断管理员
			//alert(user_time);

			if(localStorage.getItem('user_id') < 1) {
				//如果没登陆

				api.toast({
					msg: '亲爱的，你还没用登录哦！',
					duration: 2000
				});

				api.openWin({
					name: 'login',
					url: './login.html',
					delay: 300
				});
				return;

			}
			//普通用户登录检测
			if(localStorage.getItem('user_name') != null&&localStorage.getItem('user_name') != undefined&&localStorage.getItem('user_name') != '') {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 0) {
							/*    api.hideProgress();
             alert('账号或密码不正确');
原弹窗提示*/
             api.toast({
                 msg: '密码不正确或无权限！',
                 duration: 5000
             });

             
							NoAgencyAuthority()

							return;
						} else if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '验证成功 正在登录',
								duration: 5000
							});

							//alert( JSON.stringify( ret ) );
							/*
               api.sendEvent({
                 name: 'newLoingdata',
                 extra: {
                 }
               });



               api.hideProgress();

         api.closeWin({
               });

            api.openWin({
                 name: 'h5',
                 url: 'http://ys.6love.site/index/index/index',
                });
*/
                            var delay = 0;
							if(api.systemType != 'ios') {
								delay = 300;
							}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/dianka/index'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						}
					} else {
						api.hideProgress();
						/*   alert('网络错误！');
						      原弹窗提示*/
						api.toast({
							msg: '(ｷ｀ﾟДﾟ´)!!  网络错误 请检查！',
							duration: 5000
						});

						//alert( JSON.stringify( err ) );
						return;
					}
				});

			}

			//管理员取码
			if(localStorage.getItem('user_id') == 1) {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '管理员登录',
								duration: 5000
							});
                            			var delay = 0;
			if(api.systemType != 'ios') {
				delay = 300;
			}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/dianka/index'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						} else {
							api.hideProgress();
							return;
						}
					}

				});

			}

		}

		///////代理取码方法  E  //////

		///////代理设置方法  s  //////

		//获取数据
		function DailiShezhi() {
			var user_id = localStorage.getItem('user_id');
			var user_name = localStorage.getItem('user_name');
			var user_password = localStorage.getItem('password');
			var user_power = localStorage.getItem('power'); //权力  用于判断管理员
			//alert(user_time);

			if(localStorage.getItem('user_id') < 1) {
				//如果没登陆

				api.toast({
					msg: '亲爱的，你还没用登录哦！',
					duration: 2000
				});

				api.openWin({
					name: 'login',
					url: './login.html',
					delay: 300
				});
				return;

			}
			//普通用户登录检测
			if(localStorage.getItem('user_name') != null&&localStorage.getItem('user_name') != undefined&&localStorage.getItem('user_name') != '') {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 0) {
							/*    api.hideProgress();
             alert('账号或密码不正确');
原弹窗提示*/
             api.toast({
                 msg: '密码不正确或无权限！',
                 duration: 5000
             });
							NoAgencyAuthority()

							return;
						} else if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '验证成功 正在登录',
								duration: 5000
							});

							//alert( JSON.stringify( ret ) );
							/*
               api.sendEvent({
                 name: 'newLoingdata',
                 extra: {
                 }
               });



               api.hideProgress();

         api.closeWin({
               });

            api.openWin({
                 name: 'h5',
                 url: 'http://ys.6love.site/index/index/index',
                });
*/
var delay = 0;
							if(api.systemType != 'ios') {
								delay = 300;
							}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/user/pass'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						}
					} else {
						api.hideProgress();
						/*   alert('网络错误！');
						      原弹窗提示*/
						api.toast({
							msg: '(ｷ｀ﾟДﾟ´)!!  网络错误 请检查！',
							duration: 5000
						});

						//alert( JSON.stringify( err ) );
						return;
					}
				});

			}

			//管理员APP设置
			if(localStorage.getItem('user_id') == 1) {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '管理员登录',
								duration: 5000
							});
			var delay = 0;
			if(api.systemType != 'ios') {
				delay = 300;
			}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/user/pass'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						} else {
							api.hideProgress();
							return;
						}
					}

				});

			}

		}

		///////代理设置方法  E  //////

		///////代理用户管理方法  s  //////

		//获取数据
		function DailiGuanLi() {
			var user_id = localStorage.getItem('user_id');
			var user_name = localStorage.getItem('user_name');
			var user_password = localStorage.getItem('password');
			var user_power = localStorage.getItem('power'); //权力  用于判断管理员
			//alert(user_time);

			if(localStorage.getItem('user_id') < 1) {
				//如果没登陆

				api.toast({
					msg: '亲爱的，你还没用登录哦！',
					duration: 2000
				});

				api.openWin({
					name: 'login',
					url: './login.html',
					delay: 300
				});
				return;

			}
			//普通用户登录检测
			if(localStorage.getItem('user_name') != null&&localStorage.getItem('user_name') != undefined&&localStorage.getItem('user_name') != '') {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) { 
						if(ret.code == 0) {
							NoAgencyAuthority()
							return;
						} else if(ret.code == 1) {
							api.toast({
								msg: '验证成功 正在登录',
								duration: 5000
							});
							var delay = 0;
							if(api.systemType != 'ios') {
								delay = 300;
							}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/vip/index'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						}
					} else {
						api.hideProgress();
						/*   alert('网络错误！');
						      原弹窗提示*/
						api.toast({
							msg: '(ｷ｀ﾟДﾟ´)!!  网络错误 请检查！',
							duration: 5000
						});

						//alert( JSON.stringify( err ) );
						return;
					}
				});

			}

			//管理员用户管理
			if(localStorage.getItem('user_id') == 1) {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '管理员登录',
								duration: 5000
							});
			var delay = 0;
			if(api.systemType != 'ios') {
				delay = 300;
			}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/vip/index'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						} else {
							api.hideProgress();
							return;
						}
					}

				});

			}

		}

		///////代理用户管理方法  E  //////
		
		///////代理管理方法  s  //////

		//获取数据
		function wodedaili() {
			var user_id = localStorage.getItem('user_id');
			var user_name = localStorage.getItem('user_name');
			var user_password = localStorage.getItem('password');
			var user_power = localStorage.getItem('power'); //权力  用于判断管理员
			//alert(user_time);

			if(localStorage.getItem('user_id') < 1) {
				//如果没登陆

				api.toast({
					msg: '亲爱的，你还没用登录哦！',
					duration: 2000
				});

				api.openWin({
					name: 'login',
					url: './login.html',
					delay: 300
				});
				return;

			}
			//普通用户登录检测
			if(localStorage.getItem('user_name') != null&&localStorage.getItem('user_name') != undefined&&localStorage.getItem('user_name') != '') {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) { 
						if(ret.code == 0) {
							NoAgencyAuthority()
							return;
						} else if(ret.code == 1) {
							api.toast({
								msg: '验证成功 正在登录',
								duration: 5000
							});
							var delay = 0;
							if(api.systemType != 'ios') {
								delay = 300;
							}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/user/index'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						}
					} else {
						api.hideProgress();
						/*   alert('网络错误！');
						      原弹窗提示*/
						api.toast({
							msg: '(ｷ｀ﾟДﾟ´)!!  网络错误 请检查！',
							duration: 5000
						});

						//alert( JSON.stringify( err ) );
						return;
					}
				});

			}

			//管理员用户管理
			if(localStorage.getItem('user_id') == 1) {

				api.ajax({
					url: api_url + '/login/login/veify',
					method: 'POST',
					data: {
						values: {
							username: localStorage.getItem('user_name'),
							passwd: localStorage.getItem('password'),
							kjdl:localStorage.getItem('kjdl'),
						}
					}
				}, function(ret, err) {
					if(ret) {
						if(ret.code == 1) {
							/*       alert('登录成功');
							      原弹窗提示  */
							api.toast({
								msg: '管理员登录',
								duration: 5000
							});
			var delay = 0;
			if(api.systemType != 'ios') {
				delay = 300;
			}
							api.openWin({
								name: 'daili_guanli_win',
								url: './daili_guanli_win.html',
								delay: 300,
								pageParam: {
									url: api_url+'index/user/index'
								},
								bgColor: 'rgba(0,0,0,0)'
							});

						} else {
							api.hideProgress();
							return;
						}
					}

				});

			}

		}

		///////代理管理方法  E  //////		



  function totxjl(){
  	if (localStorage.getItem('user_id')>0) {
  			api.openWin({
  				name: 'txjl_win',
  				url: './txjl_win.html',
  					delay: 300,
  			});
  	}else {
  		api.openWin({
  				name: 'login',
  				url: './login.html',
  				delay: 300,
  		});
  	}
  }
  
  
  
//////////////////////    菜单导航获取  方法  getBanner  S  //////////////////////
 function getBanner(){
    var bannerid = $api.byId('slidebox');
    var bannertpl = $api.byId('bannertpl');

    api.ajax({
        url: api_url+'/login/login/banben.html',
        method: 'get',
		data: {
			values: {
				key:localStorage.getItem('anq_key'),
			}
		}
    },function(ret, err){
        if (ret) {
          localStorage.setItem('user_advert',ret.advert3);
          var advert = $api.byId('gonggao');
          advert.innerHTML = localStorage.getItem('user_advert');
            localStorage.setItem('djapi_url', ret.url);
            localStorage.setItem('play_url1', ret.url1);
            localStorage.setItem('play_url2', ret.url2);
            localStorage.setItem('play_url3', ret.url3);
            localStorage.setItem('play_url4', ret.url4);
            localStorage.setItem('play_url5', ret.url5);
            localStorage.setItem('play_url6', ret.url6);
            localStorage.setItem('play_url7', ret.url7);
            localStorage.setItem('play_url8', ret.url8);
        } else {
            //alert( JSON.stringify( err ) );
        }
    });

    api.ajax({
        url: api_url+'/app/nav',
        method: 'get',
    },function(ret, err){
        if (ret) {
          //渲染模板
		  var sd=ret.bhbanner.data;
		  var ss=sd.length;
		  if(ss>0){
			  var pagefn = doT.template(bannertpl.text);
			  bannerid.innerHTML = pagefn(ret.bhbanner);
			  banNer();
		  }
          
//      alert( JSON.stringify( ret.banner ) );
          

        } else {
            alert( '连接到服务器失败' );
            api.hideProgress();
        }
    });
  }




  //幻灯轮播图
  function banNer(){
    var slide = new auiSlide({
        container:document.getElementById("aui-slide"),
        // "width":300,
        "height":150,
        "speed":300,
        "pageShow":true,
        "autoPlay": 5000,
        "pageStyle":'dot',
        "loop":true,
        'dotPosition':'center',
    });
  }

  new auiLazyload({
      errorImage:'../image/error-img.jpg'
  });
  //////////////////////    幻灯轮播图获取  方法  banNer  E  //////////////////////  
		
		
		

		//////////////////////    代理登录无权限提示 方法 NoAgencyAuthority  s  //////////////////////
		function NoAgencyAuthority() {

			/*理登录无权限弹窗提示*/
			var dialogBox = api.require('dialogBox');
			dialogBox.alert({
				tapClose: true, //描述：（可选项）是否点击遮罩层关闭该对话框  默认值：false
				texts: {
					content: '没有权限',
					leftBtnTitle: '以后再说',
					rightBtnTitle: '升级合伙人'
				},
				styles: {
					bg: '#fff', //（可选项）字符串类型；对话框整体背景配置，支持#、rgb、rgba、img；默认：#fff
					corner: 10, //（可选项）数字类型；对话框背景圆角大小；默认：2
					w: 300, //（可选项）数字类型；对话框的宽；默认：300
					title: { //（可选项）JSON对象；弹窗标题栏样式配置，不传则不显示标题区域
						marginT: 20, //（可选项）数字类型；标题栏与对话框顶端间距；默认：20
						icon: 'widget://image/app/dialogBoxTisi.jpg', //（可选项）字符串类型；标题前面的图标路径，要求本地路径（widget://、fs://）；图片为正方形的，如：50*50、100*100，建议开发者传大小合适的图片以适配高分辨率手机屏幕，不传则不显示
						iconSize: 80, //（可选项）数字类型；icon 图标边长大小,若 icon 不存在则此参数无效；默认：24
						titleSize: 14, //（可选项）数字类型；标题字体大小；默认：14
						titleColor: '#000' //（可选项）字符串类型；标题字体颜色，支持#、rgb、rgba；默认：#fff
					},
					content: { //（可选项）JSON 对象；文本内容配置，若不传则不显示该区域
						marginT: 20, //（可选项）数字类型；内容文本顶端与标题栏底端的距离，如果标题栏不存在，则是到窗口顶端的距离；默认：20
						marginB: 40, //（可选项）数字类型；内容文本底端与 left/right 顶端的距离，如果 left/right 都不存在，则是到对话框底端的距离；默认：20
						color: '#ff0103', //（可选项）字符串类型；内容文本字体颜色，支持 rgb、rgba、#；默认：#eee
						size: 12 //（可选项）数字类型：内容文本字体大小；默认：12
					},
					left: { //（可选项）JSON 对象；左边按钮样式配置，不传则不显示左边按钮
						marginB: 30, //（可选项）数字类型；左边按钮的下边距；默认：7
						marginL: 30, //（可选项）数字类型；左边按钮的左边距；默认：20
						w: 100, //（可选项）数字类型；左边按钮的宽；默认：130
						h: 40, //（可选项）数字类型；左边按钮的高；默认：35
						corner: 10, //（可选项）数字类型；左边按钮圆角半径；默认：0.0
						bg: '#3d3d3d', //（可选项）字符串类型；左边按钮的背景，支持rgb、rgba、#、img；默认：'#e0e'
						color: '#fff', //（可选项）字符串类型；左边按钮标题字体颜色，支持rgb，rgba、#；默认：'#007FFF'
						size: 12 //（可选项）数字类型；左边按钮标题字体大小；默认：12
					},
					right: { //（可选项）JSON 对象；右边按钮样式配置，不传则不显示右边按钮
						marginB: 30, //（可选项）数字类型；右边按钮的下边距；默认：7
						marginL: 40, //（可选项）数字类型；右边按钮左边距；默认：10
						w: 100, //（可选项）数字类型；右边按钮的宽；默认：130
						h: 40, //（可选项）数字类型；右边按钮的高；默认：35
						corner: 10, //（可选项）数字类型；右边按钮圆角半径；默认：0.0
						bg: '#ff0103', //（可选项）字符串类型；右边按钮的背景，支持rgb、rgba、#、img；默认：'#e0e'
						color: '#fff', //（可选项）字符串类型；右边按钮标题字体颜色，支持rgb、rgba、#；默认：'#007FFF'
						size: 12 //（可选项）数字类型；右边按钮标题字体大小；默认：12
					}
				}
			}, function(ret) {
				if(ret.eventType == 'left') {
					var dialogBox = api.require('dialogBox');
					dialogBox.close({
						dialogName: 'alert'
					});
				} else if(ret.eventType == 'right') {
					api.openWin({
						name: 'open_agent_win',
						url: './open_agent_win.html',
						delay: 300
					});
					var dialogBox = api.require('dialogBox');
					dialogBox.close({
						dialogName: 'alert'
					});
				}
			});
			/*    理登录无权限弹窗提示结束    */

		}
		//////////////////////    代理登录无权限提示 方法 NoAgencyAuthority  E  //////////////////////

		////////////手动开始下拉刷新的加载状态 方法  fnRefreshHeaderLoading   S   ////////////
		function fnRefreshHeaderLoading() {
			api.refreshHeaderLoading();
		};
		////////////手动开始下拉刷新的加载状态 方法  fnRefreshHeaderLoading   E   ////////////

		//////////////////////    网络连接失败提示  方法  NetworkConnectionFailurePrompt   S  //////////////////////
		function NetworkConnectionFailurePrompt() {

			/*无网络弹窗提示*/
			var dialogBox = api.require('dialogBox');
			dialogBox.alert({
				tapClose: false, //描述：（可选项）是否点击遮罩层关闭该对话框  默认值：false
				texts: {
					content: '请检查网络是否顺畅',
					leftBtnTitle: '先不管',
					rightBtnTitle: '网络设置'
				},
				styles: {
					bg: '#fff', //（可选项）字符串类型；对话框整体背景配置，支持#、rgb、rgba、img；默认：#fff
					corner: 10, //（可选项）数字类型；对话框背景圆角大小；默认：2
					w: 300, //（可选项）数字类型；对话框的宽；默认：300
					title: { //（可选项）JSON对象；弹窗标题栏样式配置，不传则不显示标题区域
						marginT: 20, //（可选项）数字类型；标题栏与对话框顶端间距；默认：20
						icon: 'widget://image/app/dialogBoxTisi.jpg', //（可选项）字符串类型；标题前面的图标路径，要求本地路径（widget://、fs://）；图片为正方形的，如：50*50、100*100，建议开发者传大小合适的图片以适配高分辨率手机屏幕，不传则不显示
						iconSize: 80, //（可选项）数字类型；icon 图标边长大小,若 icon 不存在则此参数无效；默认：24
						titleSize: 14, //（可选项）数字类型；标题字体大小；默认：14
						titleColor: '#000' //（可选项）字符串类型；标题字体颜色，支持#、rgb、rgba；默认：#fff
					},
					content: { //（可选项）JSON 对象；文本内容配置，若不传则不显示该区域
						marginT: 20, //（可选项）数字类型；内容文本顶端与标题栏底端的距离，如果标题栏不存在，则是到窗口顶端的距离；默认：20
						marginB: 40, //（可选项）数字类型；内容文本底端与 left/right 顶端的距离，如果 left/right 都不存在，则是到对话框底端的距离；默认：20
						color: '#ff0103', //（可选项）字符串类型；内容文本字体颜色，支持 rgb、rgba、#；默认：#eee
						size: 12 //（可选项）数字类型：内容文本字体大小；默认：12
					},
					left: { //（可选项）JSON 对象；左边按钮样式配置，不传则不显示左边按钮
						marginB: 30, //（可选项）数字类型；左边按钮的下边距；默认：7
						marginL: 30, //（可选项）数字类型；左边按钮的左边距；默认：20
						w: 100, //（可选项）数字类型；左边按钮的宽；默认：130
						h: 40, //（可选项）数字类型；左边按钮的高；默认：35
						corner: 10, //（可选项）数字类型；左边按钮圆角半径；默认：0.0
						bg: '#3d3d3d', //（可选项）字符串类型；左边按钮的背景，支持rgb、rgba、#、img；默认：'#e0e'
						color: '#fff', //（可选项）字符串类型；左边按钮标题字体颜色，支持rgb，rgba、#；默认：'#007FFF'
						size: 12 //（可选项）数字类型；左边按钮标题字体大小；默认：12
					},
					right: { //（可选项）JSON 对象；右边按钮样式配置，不传则不显示右边按钮
						marginB: 30, //（可选项）数字类型；右边按钮的下边距；默认：7
						marginL: 40, //（可选项）数字类型；右边按钮左边距；默认：10
						w: 100, //（可选项）数字类型；右边按钮的宽；默认：130
						h: 40, //（可选项）数字类型；右边按钮的高；默认：35
						corner: 10, //（可选项）数字类型；右边按钮圆角半径；默认：0.0
						bg: '#ff0103', //（可选项）字符串类型；右边按钮的背景，支持rgb、rgba、#、img；默认：'#e0e'
						color: '#fff', //（可选项）字符串类型；右边按钮标题字体颜色，支持rgb、rgba、#；默认：'#007FFF'
						size: 12 //（可选项）数字类型；右边按钮标题字体大小；默认：12
					}
				}
			}, function(ret) {
				if(ret.eventType == 'left') {
					var dialogBox = api.require('dialogBox');
					dialogBox.close({
						dialogName: 'alert'
					});
				} else if(ret.eventType == 'right') {

					var openset = api.require('openSet');
					openset.open({
						id: 1
					});

					var dialogBox = api.require('dialogBox');
					dialogBox.close({
						dialogName: 'alert'
					});
				}
			});
			/*    无网络弹窗提示结束    */

		}
		//////////////////////    网络连接错误提示 方法 NetworkConnectionFailurePrompt  E  //////////////////////
	</script>

</html>